# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=py3-trio
pkgver=0.19.0
pkgrel=1
pkgdesc="A friendly Python library for async concurrency and I/O"
url="https://trio.readthedocs.io/"
arch="noarch"
license="MIT OR Apache-2.0"
depends="
	py3-idna
	py3-openssl
	py3-outcome
	py3-sniffio
	py3-sortedcontainers
	python3
	"
makedepends="py3-setuptools"
checkdepends="
	py3-astor
	py3-pytest
	py3-trustme
	"
source="https://pypi.python.org/packages/source/t/trio/trio-$pkgver.tar.gz
	https://github.com/python-trio/trio/commit/0639f87e58bae400070c5642f6fb339c7bb6e704.patch"
builddir="$srcdir/trio-$pkgver"

case "$CARCH" in
	ppc64le) options="$options !check" ;; # unix pipes test times out
esac

build() {
	python3 setup.py build
}

check() {
	pytest -v -m "not redistributors_should_skip"
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="
e517d19beca7607128ef066ca8ab6ff9b0934a6a35210507f4fc1907941da98a86abf1a3c23711dc9a9d86be4d5a2f648f99b6c2913cbf8665aeae7ecdfea947  trio-0.19.0.tar.gz
50a82a2cc40dc0d8bfa5c1c4f3e3f3a3153b70ff1d24f1a691b124d66f1e707e369aed3efe6e358525d1460c0aa60a0fe91a38e32e4ee2a74a522e7a53243324  0639f87e58bae400070c5642f6fb339c7bb6e704.patch
"
